﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;

namespace Kokomo.PeInspector.Reflection
{
	class AssemblyManifestResource : AssemblyResource
	{
		public AssemblyManifestResource(
			Assembly assembly,
			string name
			)
			: base(name, assembly)
		{
		}

		public override Stream GetResourceStream()
		{
			return this.Assembly.GetManifestResourceStream(this.Name);
		}
		public override int DetermineSize()
		{
			return (int)this.GetResourceStream().Length;
		}
	}
}
